class test1
{
      public static void main(String[] args)
           {

	System.out.println("Hello welcome to java");

                   byte b=110;
 	System.out.println("byte=  "+b);
	
	int i=(int) b;
	System.out.println("integer= "+i);
	
	String empid="1200";

	int emp=Integer.parseInt(empid);

	System.out.println("integer emp= "+emp);

	boolean bol=(1>0);
	System.out.println("boolean value is= "+bol);

	int j=10;
	j++;
	System.out.println("j="+j);
	++j;
	System.out.println("j="+j);
	j++;
	System.out.println("j="+j);
	
	double fahrenheit=100;
	double celsius=(5.0/9) * (fahrenheit-32);
	System.out.println("Fahrenheit"+fahrenheit+" is"+ celsius+" in celsius ");

  System.out.println("Determining a leap year");
	int year=2013;
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
	System.out.println("year "+year+" is a leap year");
	}
	else
	System.out.println("year "+year+" is not a leap year");
	System.out.println("**********************************");
	System.out.println("To find odd or even");
	int num=33;
	if(num%2==0)
		System.out.println("num is even");
	else
		System.out.println("num is odd");
	System.out.println("*****************************");
	System.out.println("To find fibonacci series from 0 to 100");
	int n=0,m1=1,fl=1;
	System.out.println(n);
	while(fl<100)
	{ 
		System.out.println(fl);
		fl=n+m1;
		n=m1;
		m1=fl;
	 } 
	System.out.println("********************************");
	System.out.println("To print text 100 times using while loop"); 
	int count=1;
	while(count<=100)
	{
		System.out.println("Hello felight "+count);
		count++;
	} 
	System.out.println("***********************************");
	System.out.println("To print text 100 times using do while loop");
	int count1=1;
	do{
		System.out.println("Hello felight "+count1);
		count1++;
	}while(count1<=100);
	System.out.println("******************************");
	System.out.println("To count even numbers between 100 to 200");
	int counteven=0,countodd=0,numm=100;
	while(numm<=200)
	{
		if(numm%2==0)
			counteven++;
		else 
			countodd++;
		numm++;
	}
	System.out.println("number of even numbers from 100 to 200 is "+counteven);
	System.out.println("number of odd numbers from 100 to 200 is "+countodd);				 
	System.out.println("******************************");
	System.out.println("To find summation of numbers between 0 to 100");
	int summ=0;
	for(i=0;i<=100;i++)
		summ+=i;
	System.out.println("Summation of numbers b/w 0 to 100 is "+summ);	
	System.out.println("**************************");
	System.out.println("To find prime numbers from 0 to 100");
	int countp=0;
	for(i=1;i<=100;i++)
	{
		for(int j=1;j<=100;j++)
		{
			if(j<=i)
				if(i%j==0)
					countp++;
		}
		if(countp==2 ||countp==1)
			System.out.println(+i+" is prime");
		countp=0;			
	}
}
}
